﻿@using UMS.Core.Enums
@using UMS.Core.Logic.App
@model UMS.Core.Data.Models.Directory.User
@{
    var p = Users.GetPasswordNotification(Model);
    var cssClass = "";
}
@if (p.Type != PasswordNotificationType.None)
{
    switch (p.Type)
    {
        case PasswordNotificationType.Reminder:
            cssClass = "ok-box";
            break;
        case PasswordNotificationType.Warning:
            cssClass = "warning-box";
            break;
        case PasswordNotificationType.Error:
            cssClass = "error-box";
            break;
    }
    <div class="box @cssClass">
        <div class="head">
            Password Expiration Reminder
        </div>
        <p>
            @Model.FirstName, your password expires
            <abbr id="passwordReminder" title="@String.Format("{0:s}", p.ExpirationDate)">
            </abbr>
            . You can change your password @Html.ActionLink("here", "Password", "Me").
        </p>
        @if (!String.IsNullOrWhiteSpace(p.AdditionalText))
        {
                
            <p>@p.AdditionalText</p>
        }
    </div>
}